﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace MapLibrary.Players.CollisionResponse
{
    public class DamageBehavior : CollisionBehavior
    {
        private IDamageable toDamage;
        private int damageAmount;

        public DamageBehavior(IDamageable toDamage, int damageAmount)
        {
            this.damageAmount = damageAmount;
            this.toDamage = toDamage;
        }

        public override void Update(bool contained)
        {
            if (contained)
                toDamage.DealDamage(damageAmount);
        }
    }
}
